#!/bin/bash
if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_BRANCH == "master" ]]
then
    echo "-- pushing docs --"

    ( cd docs
    git init
    git config user.email "travis@travis-ci.com"
    git config user.name "Travis Bot"

    git add .
    git commit -m "Deployed to GitHub Pages"
    git push --force --quiet "https://${GHTOKEN}@${GHREPO}" master:gh-pages 1>  /dev/null
    )
else
    echo "-- will only push docs from master --"
fi
